#include <stdio.h>

#define TRACE(x...)  
#define PRINT(x...) TRACE(printf(x))

int n;
int vec[100010];
int seq[10];
int asc;
int found;
int fl;

int main() {
	scanf("%d", &n);

	for (int i=0; i<n; i++)
		scanf("%d", &vec[i]);

	if (n<3) {
		printf("0\n");
		return 0;
	}

	found=0;
	fl=0;

	for (int i=1; i<n; i++) {
		PRINT("%d %d\n", vec[i], vec[i-1]);
		
		if (((vec[i]-vec[i-1])>0)) {
			if (fl && !asc) {
				PRINT("part 2: asc\n");
				seq[1]=i-1;seq[2]=i; found=1; break;	
			}
			else {
				if (fl) continue;

				PRINT("part 1: asc\n");
				asc=1; fl=1; seq[0]=i-1;
				seq[1]=i;
			}
		}
		else if (((vec[i]-vec[i-1])<0)) {
			if (fl && asc) {
				PRINT("part 2: desc\n");
				seq[1]=i-1; seq[2]=i; found=1; break;
			}
			else {
				if (fl) continue;

				PRINT("part 1: desc\n");

				asc=0; fl=1; seq[0]=i-1;
				seq[1]=i;
			}
		}

		PRINT("\n");
	}

	if (found) {
		printf("3\n");
		printf("%d %d %d\n", seq[0]+1, seq[1]+1, seq[2]+1);
	}
	else {
		printf("0\n");
	}

	return 0;
}
